package com.wy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Author: wy
 * @Date:2019/10/27 17:46
 */

  @RequestMapping("/thymeleaf")
  @Controller
public class ThymeLeafController {

       @RequestMapping("/hello")
        public String hello(@RequestParam(value = "name",required = false)String name, Model model){

             model.addAttribute("name",name);
             return  "index";
        }
}
